public class Test2 {
    public static void main(String[] args) {
        Person person = new Person();
        person.name = "陈秋雪";
        person.eat();
        System.out.println(person.name);
    }

}

class Person{
    public String name;
    public int age;

    public void eat(){
        System.out.println(name + "老子在吃饭");
    }
}

class Dog{
    public String name;
    public int age;
    public String color;

    public void eat(){
        System.out.println("吃饭！");
    }
}

class WashMachine{
    //字段 属性 成员属性 成员变量
    public String brand;
    public String type;
    public double weight;

    //成员方法
    public void washClothes(){
        System.out.println("洗衣功能");
    }
    public void dryClothes(){
        System.out.println("脱水功能");
    }
}
